//
//  KFDMarketFinancialDataMoreCell.m
//  KFD
//
//  Created by JIRENTIANXIANG on 7/11/15.
//  Copyright © 2015 kfd. All rights reserved.
//

#import "KFDMarketFinancialDataMoreCell.h"
#import "ui_config.h"

@implementation KFDMarketFinancialDataMoreCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)moreButtonPressed:(id)sender {
    if (self.loadMoreAction) {
        self.loadMoreAction();
    }
}

-(void)drawRect:(CGRect)rect
{
    CGPoint origin=rect.origin;
    CGSize size=rect.size;
    CGContextRef context=UIGraphicsGetCurrentContext();
    UIColor* separatorColor=KFD_TABLEVIEW_SEPARATOR_COLOR;
    
    //separator
//    CGContextSetStrokeColorWithColor(context, separatorColor.CGColor);
//    CGContextSetLineWidth(context, 1);
//    CGFloat left=origin.x+70;
//    CGFloat right=origin.x+size.width-20;
//    CGFloat y=origin.y+size.height;
//    CGPoint separatorPoints[2]={
//        CGPointMake(left, y),
//        CGPointMake(right, y)
//    };
//    CGContextStrokeLineSegments(context, separatorPoints, 2);
    
    //vertical line
    CGFloat x=50;
    CGFloat top=origin.y;
    CGFloat bottom=origin.y+size.height;
    CGPoint verticalLinePoints[2]={
        CGPointMake(x, top),
        CGPointMake(x, bottom)
    };
    CGContextStrokeLineSegments(context, verticalLinePoints, 2);
    
    //dot
    CGContextSetFillColorWithColor(context, separatorColor.CGColor);
    CGContextFillEllipseInRect(context, CGRectMake(x-3, 15, 6, 6));
}

@end
